<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>社交网站常用导航样式展示</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #4361ee;
            --primary-light: #eef0ff;
            --secondary: #6c757d;
            --light: #f8f9fa;
            --dark: #212529;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
            --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        
        body {
            font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: #f5f7fa;
            color: var(--dark);
            padding: 30px 0;
        }
        
        .container {
            max-width: 1200px;
        }
        
        .page-title {
            margin-bottom: 2rem;
            color: var(--dark);
            font-weight: 700;
            text-align: center;
        }
        
        .nav-card {
            background-color: white;
            border-radius: 8px;
            box-shadow: var(--shadow);
            padding: 1.5rem;
            margin-bottom: 2.5rem;
            transition: transform 0.3s, box-shadow 0.3s;
        }
        
        .nav-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }
        
        .nav-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--primary);
            display: flex;
            align-items: center;
        }
        
        .nav-title i {
            margin-right: 10px;
            font-size: 1.4rem;
        }
        
        .nav-description {
            color: var(--secondary);
            font-size: 0.95rem;
            margin-bottom: 1.25rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px dashed #e9ecef;
        }
        
        /* 主导航栏样式 */
        .main-nav {
            background-color: white;
            border-radius: 6px;
            box-shadow: var(--shadow);
        }
        
        .main-nav .navbar-brand {
            color: var(--primary);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .main-nav .nav-link {
            color: var(--dark);
            margin: 0 8px;
            transition: all 0.2s;
            position: relative;
        }
        
        .main-nav .nav-link:hover {
            color: var(--primary);
        }
        
        .main-nav .nav-link.active {
            color: var(--primary);
        }
        
        .main-nav .nav-link.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background-color: var(--primary);
            border-radius: 3px 3px 0 0;
        }
        
        /* 侧边导航样式 */
        .sidebar {
            background-color: white;
            border-radius: 6px;
            box-shadow: var(--shadow);
            padding: 1rem 0;
        }
        
        .sidebar .nav-link {
            color: var(--dark);
            padding: 10px 1.5rem;
            margin-bottom: 4px;
            transition: all 0.2s;
            display: flex;
            align-items: center;
        }
        
        .sidebar .nav-link i {
            width: 20px;
            margin-right: 12px;
            font-size: 1.1rem;
        }
        
        .sidebar .nav-link:hover {
            background-color: var(--primary-light);
            color: var(--primary);
        }
        
        .sidebar .nav-link.active {
            background-color: var(--primary-light);
            color: var(--primary);
            font-weight: 500;
            border-left: 3px solid var(--primary);
        }
        
        /* 底部导航样式 */
        .bottom-navigation {
            max-width: 400px;
            margin: 0 auto;
            background-color: white;
            border-radius: 12px 12px 0 0;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
            padding: 12px 0;
        }
        
        .bottom-navigation .nav-link {
            color: var(--secondary);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 8px 12px;
            font-size: 0.75rem;
            transition: all 0.2s;
        }
        
        .bottom-navigation .nav-link i {
            font-size: 1.25rem;
            margin-bottom: 4px;
        }
        
        .bottom-navigation .nav-link.active {
            color: var(--primary);
        }
        
        .bottom-navigation .nav-link.middle {
            position: relative;
            top: -15px;
        }
        
        .bottom-navigation .nav-link.middle i {
            width: 50px;
            height: 50px;
            background-color: var(--primary);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
        }
        
        /* 标签页导航样式 */
        .tab-navigation .nav-tabs {
            border-bottom: 1px solid #e9ecef;
            margin-bottom: 1rem;
        }
        
        .tab-navigation .nav-link {
            color: var(--secondary);
            border: none;
            padding: 10px 20px;
            font-weight: 500;
            position: relative;
        }
        
        .tab-navigation .nav-link.active {
            color: var(--primary);
            background-color: transparent;
        }
        
        .tab-navigation .nav-link.active::after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            width: 100%;
            height: 3px;
            background-color: var(--primary);
        }
        
        /*  Pills导航样式 */
        .pills-navigation .nav-pills .nav-link {
            color: var(--dark);
            background-color: var(--light);
            border-radius: 20px;
            padding: 6px 18px;
            margin-right: 8px;
            margin-bottom: 8px;
            transition: all 0.2s;
        }
        
        .pills-navigation .nav-pills .nav-link.active {
            background-color: var(--primary);
            color: white;
        }
        
        /* 图标导航样式 */
        .icon-navigation {
            background-color: white;
            border-radius: 8px;
            padding: 1rem;
            box-shadow: var(--shadow);
        }
        
        .icon-navigation .nav-link {
            color: var(--secondary);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 15px 10px;
            transition: all 0.2s;
            border-radius: 6px;
        }
        
        .icon-navigation .nav-link i {
            font-size: 1.5rem;
            margin-bottom: 8px;
        }
        
        .icon-navigation .nav-link:hover,
        .icon-navigation .nav-link.active {
            background-color: var(--primary-light);
            color: var(--primary);
        }
        
        /* 用户菜单导航 */
        .user-menu .nav-item {
            position: relative;
        }
        
        .user-menu .dropdown-menu {
            right: 0;
            left: auto;
            border: none;
            box-shadow: var(--shadow-hover);
            border-radius: 8px;
            padding: 8px 0;
            min-width: 200px;
        }
        
        .user-menu .dropdown-item {
            padding: 10px 16px;
            transition: all 0.2s;
        }
        
        .user-menu .dropdown-item:hover {
            background-color: var(--primary-light);
            color: var(--primary);
        }
        
        .user-menu .dropdown-divider {
            margin: 4px 0;
        }
        
        .user-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid transparent;
        }
        
        /* 响应式调整 */
        @media (max-width: 768px) {
            .pills-navigation .nav-pills {
                flex-wrap: wrap;
            }
            
            .icon-navigation .nav {
                flex-wrap: wrap;
            }
            
            .icon-navigation .nav-item {
                flex: 0 0 33.333%;
                text-align: center;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1 class="page-title">社交网站常用导航样式展示</h1>
        
        <!-- 1. 顶部主导航 -->
        <div class="nav-card">
            <h3 class="nav-title">
                <i class="fas fa-bars"></i>
                顶部主导航
            </h3>
            <p class="nav-description">适用于桌面端社交网站的顶部主导航，包含品牌标识、主要功能入口和用户菜单，支持响应式折叠。</p>
            
            <nav class="navbar navbar-expand-lg main-nav">
                <div class="container-fluid">
                    <a class="navbar-brand" href="#">
                        <i class="fas fa-connectdevelop"></i>
                        <span>社交连接</span>
                    </a>
                    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNav">
                        <span class="navbar-toggler-icon"></span>
                    </button>
                    
                    <div class="collapse navbar-collapse" id="mainNav">
                        <ul class="navbar-nav me-auto">
                            <li class="nav-item">
                                <a class="nav-link active" href="#">首页</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">发现</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">消息</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">好友</a>
                            </li>
                            <li class="nav-item dropdown user-menu">
                                <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
                                    更多
                                </a>
                                <ul class="dropdown-menu">
                                    <li><a class="dropdown-item" href="#">群组</a></li>
                                    <li><a class="dropdown-item" href="#">活动</a></li>
                                    <li><a class="dropdown-item" href="#">收藏</a></li>
                                    <li><hr class="dropdown-divider"></li>
                                    <li><a class="dropdown-item" href="#">设置</a></li>
                                </ul>
                            </li>
                        </ul>
                        
                        <ul class="navbar-nav user-menu">
                            <li class="nav-item dropdown">
                                <a class="nav-link dropdown-toggle d-flex align-items-center gap-2" href="#" role="button" data-bs-toggle="dropdown">
                                    <img src="https://picsum.photos/200/200?random=1" alt="用户头像" class="user-avatar">
                                    <span class="d-none d-lg-inline">用户名</span>
                                </a>
                                <ul class="dropdown-menu">
                                    <li><a class="dropdown-item" href="#">个人主页</a></li>
                                    <li><a class="dropdown-item" href="#">账号设置</a></li>
                                    <li><a class="dropdown-item" href="#">隐私安全</a></li>
                                    <li><hr class="dropdown-divider"></li>
                                    <li><a class="dropdown-item text-danger" href="#">退出登录</a></li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </div>
            </nav>
        </div>
        
        <!-- 2. 侧边栏导航 -->
        <div class="nav-card">
            <h3 class="nav-title">
                <i class="fas fa-stream"></i>
                侧边栏导航
            </h3>
            <p class="nav-description">适用于社交平台的个人中心或管理后台，提供清晰的功能分类和层级结构，便于用户快速定位所需功能。</p>
            
            <div class="row">
                <div class="col-md-3">
                    <ul class="nav flex-column sidebar">
                        <li class="nav-item">
                            <a class="nav-link active" href="#">
                                <i class="fas fa-home"></i>
                                首页
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">
                                <i class="fas fa-user"></i>
                                个人资料
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">
                                <i class="fas fa-users"></i>
                                我的好友
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">
                                <i class="fas fa-comments"></i>
                                消息中心
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">
                                <i class="fas fa-bell"></i>
                                通知提醒
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">
                                <i class="fas fa-bookmark"></i>
                                我的收藏
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="#">
                                <i class="fas fa-cog"></i>
                                账户设置
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="col-md-9">
                    <div class="p-4 bg-light rounded border">
                        <h5>主内容区域</h5>
                        <p class="text-muted">根据侧边栏选择的导航项展示对应的内容</p>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 3. 移动端底部导航 -->
        <div class="nav-card">
            <h3 class="nav-title">
                <i class="fas fa-mobile-alt"></i>
                移动端底部导航
            </h3>
            <p class="nav-description">专为移动设备设计的底部导航栏，将核心功能放在屏幕底部，方便用户单手操作，包含突出的发布按钮。</p>
            
            <div class="bottom-navigation">
                <ul class="nav justify-content-around">
                    <li class="nav-item">
                        <a class="nav-link active" href="#">
                            <i class="fas fa-home"></i>
                            <span>首页</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-compass"></i>
                            <span>发现</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link middle" href="#">
                            <i class="fas fa-plus"></i>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-comment-dots"></i>
                            <span>消息</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-user"></i>
                            <span>我的</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        
        <!-- 4. 标签页导航 -->
        <div class="nav-card">
            <h3 class="nav-title">
                <i class="fas fa-thumbtack"></i>
                标签页导航
            </h3>
            <p class="nav-description">适用于社交平台中内容分类展示，如动态流、话题、推荐等不同内容板块的切换，清晰展示当前位置。</p>
            
            <div class="tab-navigation">
                <ul class="nav nav-tabs">
                    <li class="nav-item">
                        <a class="nav-link active" data-bs-toggle="tab" href="#tab1">关注动态</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-bs-toggle="tab" href="#tab2">热门话题</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-bs-toggle="tab" href="#tab3">推荐内容</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-bs-toggle="tab" href="#tab4">附近动态</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-bs-toggle="tab" href="#tab5">视频直播</a>
                    </li>
                </ul>
                
                <div class="tab-content p-3 bg-light rounded">
                    <div class="tab-pane fade show active" id="tab1">
                        <p>您关注的用户最新发布的动态内容展示区域...</p>
                    </div>
                    <div class="tab-pane fade" id="tab2">
                        <p>当前平台上最热门的话题和讨论内容...</p>
                    </div>
                    <div class="tab-pane fade" id="tab3">
                        <p>根据您的兴趣推荐的个性化内容...</p>
                    </div>
                    <div class="tab-pane fade" id="tab4">
                        <p>您附近的用户发布的内容和活动信息...</p>
                    </div>
                    <div class="tab-pane fade" id="tab5">
                        <p>正在进行的视频直播和直播回放内容...</p>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 5. Pills导航 -->
        <div class="nav-card">
            <h3 class="nav-title">
                <i class="fas fa-filter"></i>
                Pills导航
            </h3>
            <p class="nav-description">适用于社交平台中的内容筛选，如按内容类型、时间范围或其他条件进行过滤，操作直观便捷。</p>
            
            <div class="pills-navigation">
                <ul class="nav nav-pills">
                    <li class="nav-item">
                        <a class="nav-link active" data-bs-toggle="pill" href="#pill1">全部内容</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-bs-toggle="pill" href="#pill2">图文动态</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-bs-toggle="pill" href="#pill3">视频内容</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-bs-toggle="pill" href="#pill4">文章资讯</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" data-bs-toggle="pill" href="#pill5">活动公告</a>
                    </li>
                </ul>
                
                <div class="tab-content p-3 bg-light rounded mt-3">
                    <div class="tab-pane fade show active" id="pill1">
                        <p>展示所有类型的内容，包括图文、视频、文章和活动等...</p>
                    </div>
                    <div class="tab-pane fade" id="pill2">
                        <p>仅展示用户发布的图文动态内容...</p>
                    </div>
                    <div class="tab-pane fade" id="pill3">
                        <p>仅展示视频类型的内容...</p>
                    </div>
                    <div class="tab-pane fade" id="pill4">
                        <p>仅展示长文和资讯类内容...</p>
                    </div>
                    <div class="tab-pane fade" id="pill5">
                        <p>仅展示各类活动和公告信息...</p>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 6. 快捷功能图标导航 -->
        <div class="nav-card">
            <h3 class="nav-title">
                <i class="fas fa-th-large"></i>
                快捷功能图标导航
            </h3>
            <p class="nav-description">以图标+文字的形式展示常用功能入口，适用于社交平台的个人中心或首页快捷操作区，直观易用。</p>
            
            <div class="icon-navigation">
                <ul class="nav justify-content-around">
                    <li class="nav-item">
                        <a class="nav-link active" href="#">
                            <i class="fas fa-user-plus"></i>
                            <span>添加好友</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-images"></i>
                            <span>相册</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-video"></i>
                            <span>直播</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-calendar-alt"></i>
                            <span>活动</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-shopping-bag"></i>
                            <span>商城</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-gamepad"></i>
                            <span>游戏</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-qrcode"></i>
                            <span>扫一扫</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="fas fa-ellipsis-h"></i>
                            <span>更多</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // 导航项激活状态切换
        document.querySelectorAll('.nav-link:not([data-bs-toggle="dropdown"])').forEach(link => {
            link.addEventListener('click', function() {
                // 获取同一导航组中的所有导航项
                const siblings = this.closest('.nav').querySelectorAll('.nav-link');
                
                // 移除所有导航项的active类
                siblings.forEach(sib => sib.classList.remove('active'));
                
                // 为当前点击的导航项添加active类
                this.classList.add('active');
            });
        });
    </script>
</body>
</html>
    
